home *** CD-ROM | disk | FTP | other *** search
- BAT-HINT.DOC
-
- No program is ever bug-free. However, it is nice to pretend that
- one is, and an effective way to pretend that a particular program
- has achieved such a goal is by never having it require your
- attention when you are attending to other things.
-
- STadel tries to emulate this sort of software by returning a
- value to GEMDOS when it terminates gracefully. There are 4 possible
- values returned by STadel that can be read by a GEMDOS batch file
- (provided, of course, that you are using a batch processor that can
- handle it.):
-
- 0) indicates that the sysop requested that the program terminate.
- 1) indicates that the system terminated due to the TIMEOUT
- parameter in CTDLCNFG.SYS.
- 2) indicates ABNORMAL termination, i.e., the system had an error
- of some sort and has crashed gracefully.
- 3) indicates that a Remote sysop has taken the system down via
- Remote sysop capabilities.
-
- Furthermore, STadel, when called with ANY argument(s) on the
- command line, will leave message in the Aide> room notifying the
- aides that the system came up at the time specified in the message
- header. The argument itself doesn't matter; it's presence on the
- command line is the important part.
-
- And, plus, when CONFIGUR is called with any argument(s) (just
- like CITADEL, above), it will assume that it is in unattended mode,
- and will not ask the sysop if he wants to erase the files; it will
- assume that since the sysop is not around, he wants to preserve his
- data files, and just scans the files.
-
- What can you do with the above? Here is the batch file I use
- for running STadel with the teeny-shell (my own shell....)
-
- >> #
- >> # Fire pell up and let it fly...
- >> #
- >> here=$cwd
- >> cd f:/
- >> while [ "$status" !~ exit ]
- >> if [ ! -e CTDLTABL.SYS ]
- >> configur x
- >> status=$? crash=kablooey
- >> if [ $status !~ 0 ] ; status=exit; fi
- >> else
- >> status=0
- >> fi
- >> if [ $status ~ 0 ]
- >> citadel +netlog $crash
- >> status=$?
- >> # echo citadel returns status = $status
- >> if [ $status ~ 1 ] ; cp -f *.sys backup; fi # timeout
- >> if [ $status ~ 0 ] ; status=exit ; fi # sysop exit
- >> if [ $status ~ 3 ] ; status=exit ; fi # remote exit
- >> if [ $status ~ 10 ]; uucall ; fi # uucp event
- >> fi
- >> unset crash
- >> done
- >> unset status # in case we sourc'ed this file....
- >> cd $here
-